﻿using MMO_MANAGER.FORM_CATALOG;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace MMO_MANAGER
{
    class _TabControl
    {
        private static frmEmailList mEmail;

        public static void EMAILLIST()
        {
            if (mEmail == null || mEmail.IsDisposed)
            {
                mEmail = new frmEmailList();
                mEmail.MdiParent = Form.ActiveForm;
                mEmail.Show();
            }
            else
                mEmail.Close();
            mEmail.Dispose();
            mEmail = new frmEmailList();
            mEmail.MdiParent = Form.ActiveForm;
            mEmail.Show();
        }

        private static frmGAList mGAlist;
        public static void GALIST()
        {
            if (mGAlist == null || mGAlist.IsDisposed)
            {
                mGAlist = new frmGAList();
                mGAlist.MdiParent = Form.ActiveForm;
                mGAlist.Show();
            }
            else
                mGAlist.Close();
            mGAlist.Dispose();
            mGAlist = new frmGAList();
            mGAlist.MdiParent = Form.ActiveForm;
            mGAlist.Show();
        }

        private static frmGpageList mGPList;
        public static void GPLIST()
        {
            if (mGPList == null || mGPList.IsDisposed)
            {
                mGPList = new frmGpageList();
                mGPList.MdiParent = Form.ActiveForm;
                mGPList.Show();
            }
            else
                mGPList.Close();
            mGPList.Dispose();
            mGPList = new frmGpageList();
            mGPList.MdiParent = Form.ActiveForm;
            mGPList.Show();
        }

        private static frmKeyWordList mKWList;
        public static void KWLIST()
        {
            if (mKWList == null || mKWList.IsDisposed)
            {
                mKWList = new frmKeyWordList();
                mKWList.MdiParent = Form.ActiveForm;
                mKWList.Show();
            }
            else
                mKWList.Close();
            mKWList.Dispose();
            mKWList = new frmKeyWordList();
            mKWList.MdiParent = Form.ActiveForm;
            mKWList.Show();
        }

        private static frmLabelList mLBList;
        public static void LBLIST()
        {
            if (mLBList == null || mLBList.IsDisposed)
            {
                mLBList = new frmLabelList();
                mLBList.MdiParent = Form.ActiveForm;
                mLBList.Show();
            }
            else
                mLBList.Close();
            mLBList.Dispose();
            mLBList = new frmLabelList();
            mLBList.MdiParent = Form.ActiveForm;
            mLBList.Show();
        }

        private static frmChannelList mChannel;
        public static void CHANNELLIST()
        {
            if (mChannel == null || mChannel.IsDisposed)
            {
                mChannel = new frmChannelList();
                mChannel.MdiParent = Form.ActiveForm;
                mChannel.Show();
            }
            else
                mChannel.Close();
            mChannel.Dispose();
            mChannel = new frmChannelList();
            mChannel.MdiParent = Form.ActiveForm;
            mChannel.Show();
        }

        private static frmNetworkList mNetwork;
        public static void NETWORKLIST()
        {
            if (mNetwork == null || mNetwork.IsDisposed)
            {
                mNetwork = new frmNetworkList();
                mNetwork.MdiParent = Form.ActiveForm;
                mNetwork.Show();
            }
            else
                mNetwork.Close();
            mNetwork.Dispose();
            mNetwork = new frmNetworkList();
            mNetwork.MdiParent = Form.ActiveForm;
            mNetwork.Show();
        }

    }
}
